/**
  ******************************************************************************
  * @file    bsp_led.h
  * @author  zwx
  * @version V1.8.0
  * @date    2019-01-29
  * @brief
  ******************************************************************************
  */

#ifndef __BSP_UART_H__
#define __BSP_UART_H__

#include "stm32f10x.h"

/* PLC usart param */
enum USART_RecvState
{
    USART_HEAD,
    USART_CMD,
    USART_DATA1,
    USART_DATA2,
};

typedef struct USART_RecvData
{
    uint8_t cmd;
    uint16_t data;
} USART_RecvData_t;

#define USART_REMOTE_BUF_CNT    30
extern uint8_t UartToSbuf[USART_REMOTE_BUF_CNT];
/* Exported functions ---------------------------------------------------------*/
void bsp_InitUart(void);
void UART1_SendBuf(char *buf, int count);


#endif

/************************************** end *************************************/
